<?php
    if(!isset($dbms))
        $dbms = "mysql";
    /**
     * check whether dbms is set to a supported
     * database managment system and path.
     * Otherwise default to mysql.
     */
    if(     $dbms != 'mysql' &&
            $dbms != 'sqlite')
        $dbms = "mysql";
    /**
     * Set the include paths so that all include directories
     * are available regardless of the location of the
     * executing script. DBMS is necessary since all database
     * scripts for the same purpose have the same name
     * but are in different folders named using the name of the DBMS.
     * Depending from where the script is being called paths may need to be adjusted.
     */
    $oldPaths = ini_get("include_path");
    if(!isset($pathAdjust))
        $pathAdjust = "";
    $duPath = ".:$pathAdjust:{$pathAdjust}dba:{$pathAdjust}dba/$dbms:{$pathAdjust}install:$oldPaths";              //UNIX
    @ini_set("include_path", $duPath) . "<br>";
    if (@include('testInclude.inc') == 'OK') {
        //don't do anything here
    } else {
        $dwPath =  ".;$pathAdjust;{$pathAdjust}dba;{$pathAdjust}dba/$dbms;{$pathAdjust}install;$oldPaths";          //windows
        @ini_set("include_path", $dwPath);
    }
?>

